package com.gps.skyrc.api;


import com.gps.skyrc.bean.DeviceInfo;

import java.util.ArrayList;
import java.util.List;

public class Dev {
    private static Dev instance;

    private Dev() {
    }

    public static synchronized Dev getInstance() {
        if (instance == null) {
            synchronized (Dev.class) {
                if (instance == null) {
                    instance = new Dev();
                }
            }
        }
        return instance;
    }

    private DeviceInfo info = new DeviceInfo();
    private List<DeviceInfo> infos = new ArrayList<>();

    public DeviceInfo getInfo() {
        return info;
    }

    public void setInfo(int position) {
        this.info = infos.get(position);
    }

    public List<DeviceInfo> getInfos() {
        return infos;
    }

    public void setInfos(List<DeviceInfo> infos) {
        this.infos = infos;
    }
}
